require(['./config'], () => {
    require(['swiper', 'template', 'header'], (Swiper, template) => {
        class Index {
            constructor() {
                this.banner()
            }
            banner() {
                    var swiper = new Swiper('.banner .swiper-container', {
                        pagination: '.banner .swiper-pagination',
                        paginationClickable: '.banner .swiper-pagination',
                        navigation: { // 前进后退按钮
                            nextEl: '.swiper-button-next',
                            prevEl: '.swiper-button-prev',
                        },
                        spaceBetween: 30,
                        loop: true, // 循环模式
                        autoplay: true, //自动播放
                        autoplay: {
                            delay: 3000,
                            stopOnLastSlide: false, //如果设置为true,当切换到最后一个slide时停止自动切换
                            disableOnInteraction: false, //用户操作swiper之后，是否禁止autoplay。默认为true：停止。
                        },
                    });
                }
                // 下
        }
        new Index()
    })

})